<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>109-history对象.html</title>
</head>
<body>
	<button id="btn1">前进</button>
	<button id="btn2">后退</button>
	<a href="http://www.kuazhu.com">跨猪网</a>
</body>
<script>
	var oBtnGo = document.getElementById('btn1');
	var oBtnBack = document.getElementById('btn2');


	oBtnGo.onclick = function(){
		// window.history.go(1);
		window.history.forward();
	}
	oBtnBack.onclick = function(){
		// window.history.go(-1);
		window.history.back();
	}
</script>
</html>